﻿@using System.Diagnostics
@using Moonglade.Model
@inject Microsoft.AspNetCore.Hosting.IWebHostEnvironment WebHostEnvironment

@{
    Layout = "_LayoutAdmin";
}

<partial name="_SettingsHeader" />

<div class="card mb-4">
    <div class="card-header">
        @Localizer["Server Information"]
    </div>
    <table class="table table-bordered">
        <thead>
            <tr>
                <th>@Localizer["Item"]</th>
                <th>@Localizer["Value"]</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>@Localizer["System"]</td>
                <td>@System.Runtime.InteropServices.RuntimeInformation.OSDescription</td>
            </tr>
            <tr>
                <td>@Localizer["Directory"]</td>
                <td>@Environment.CurrentDirectory</td>
            </tr>
            <tr>
                <td>@Localizer["64 Bit Process"]</td>
                <td>@Environment.Is64BitProcess</td>
            </tr>
            <tr>
                <td>@Localizer["Machine Name"]</td>
                <td>@Environment.MachineName</td>
            </tr>
            <tr>
                <td>@Localizer["User Name"]</td>
                <td>@Environment.UserName</td>
            </tr>
            <tr>
                <td>@Localizer[".NET Core Version"]</td>
                <td>@Environment.Version</td>
            </tr>
            <tr>
                <td>@Localizer["Worker Process"]</td>
                <td>@Process.GetCurrentProcess().ProcessName</td>
            </tr>
        </tbody>
    </table>
</div>

<div class="card mb-4">
    <div class="card-header">
        @Localizer["Moonglade Configuration"]
    </div>
    <table class="table table-bordered">
        <thead>
            <tr>
                <th>@Localizer["Item"]</th>
                <th>@Localizer["Value"]</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>@Localizer["Data Directory"]</td>
                <td>@AppDomain.CurrentDomain.GetData(Constants.DataDirectory)</td>
            </tr>
            <tr>
                <td>@Localizer["App Base Directory"]</td>
                <td>@WebHostEnvironment.ContentRootPath</td>
            </tr>
            <tr>
                <td>@Localizer["Editor"]</td>
                <td>@Settings.Value.Editor</td>
            </tr>
        </tbody>
    </table>
</div>